package com.cgw.dmplt.address.dao.ibatis;

import java.util.List;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import com.cgw.dmplt.address.domain.CityStreet;
import com.cgw.dmplt.address.dao.CityStreetDao;

/**
 *
 */
public class CityStreetDaoImpl extends SqlMapClientDaoSupport implements CityStreetDao
{
    
    /**
     * insert.
     * @param CityStreet CityStreet
     * @return id
     * 
     */
    public String insertCityStreet(CityStreet CityStreet) {
    	getSqlMapClientTemplate().insert("CityStreet_insertCityStreet", CityStreet);
    	return null;
    }

    /**
     * delete.
     * @param CityStreet CityStreet
     * 
     */
    public void deleteCityStreet(CityStreet CityStreet){
        getSqlMapClientTemplate().update("CityStreet_deleteCityStreet", CityStreet);
    }
    
    /**
     * update.
     * @param CityStreet CityStreet
     * 
     */
    public void updateCityStreet(CityStreet CityStreet) {
    	getSqlMapClientTemplate().update("CityStreet_updateCityStreet", CityStreet);
    }
    
    /**
     * find.
     * @param id id
     * @return CityStreet
     * 
     */
    public CityStreet findCityStreet(Integer pk) {
        CityStreet CityStreet = (CityStreet) getSqlMapClientTemplate().queryForObject("CityStreet_findCityStreet", pk);
        return CityStreet;
    }
    
    public List findCityStreetRoot(String pk) {
        List list =   getSqlMapClientTemplate().queryForList("CityStreet_findCityStreet", pk);
        return list;
    }
    
    /**
     * list.
     * @param CityStreet CityStreet
     * @return CityStreet list
     * 
     */
    public List listCityStreet(CityStreet CityStreet) {
        List list = getSqlMapClientTemplate().queryForList("CityStreet_listCityStreet", CityStreet);
        return list;
    }  
    
    /**
     * listCount.
     * @param CityStreet CityStreet
     * @return list count
     * 
     */
    public Integer listCityStreetCount(CityStreet CityStreet) {
        Integer count = (Integer)getSqlMapClientTemplate().queryForObject("CityStreet_listCityStreetCount", CityStreet);
        return count;
    }
}
